﻿@{
    ViewBag.Title = "test";
}

<h2>test</h2>
  $("#roundbutton").click(function() {
    $.ajax({
      url: "Games/PushButtonGame",
      type: "get",
      data: $("form").serialize(), //if you need to post Model data, use this
      success: function(result) {
        $("#partial").html(result);
      }
    });
});

 @Html.Partial("_PushButton", Model)

<script type="text/javascript">

  $(function () {
    $('form').submit(function () {
      if ($(this).valid()) {
        $.ajax({
          url: this.action,
          type: this.method,
          data: $(this).serialize(),
          success: function (result) {
            $('#partial').html(result);
          }
        });
      }
      return false;
    });
  });

</script>

@using (Html.BeginForm())
{
  <br />
  <button type="submit" id="roundbutton" >@Model.GetCounter().ToString(CultureInfo.InvariantCulture)</button>
}